let { tool, DB, iconv, cheerio } = require("../common/main");
let request = require("request");
let fs = require("fs");

module.exports = {
    /**
     * @description 登陆
     * @author 蜂鸟配送
     */
    login: (params, cookie, httpIp) => {
        return new Promise((resolve, reject) => {
            tool.$ajax({
                type: "post",
                url: `http://www.douyin2688.com/?m=index&c=login`,
                httpIp: httpIp,
                data: params || {},
                headers: {
                    cookie
                },
                form: true,
                success: (data) => {
                    resolve(data);
                },
                error: res => {
                    reject(res);
                }
            })
        });
    }
};
